//
//  UIView+TT.m
//  TT
//
//Users/lenny/Desktop/途途2.0/TT/TT/AppDelegate.m/  Created by Lenny on 16/5/6.
//  Copyright © 2016年 Lenny. All rights reserved.
//

#import "UIView+TT.h"

@implementation UIView (TT)


- (UIImage *)convertViewToImage
{
    UIGraphicsBeginImageContext(self.bounds.size);
    [self drawViewHierarchyInRect:self.bounds afterScreenUpdates:YES];
    UIImage *screenshot = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    return screenshot;
}

@end
